package com.lyz.dataStructure.algorithm.当当2020;/**
 * @Author:759057893@qq.com Lyz
 * @Date: ${Date} 20:51
 * @Description:
 **/

/**
 *@Author:759057893@qq.com Lyz
 *@Date: 2019/9/2 20:51
 *@Description:
 **/
import java.util.HashMap;
import java.util.Scanner;

public class Main2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] str = sc.nextLine().replace(" ","").toCharArray();
        HashMap<Character,Integer> map = new HashMap<>();
        for(int i=0;i<str.length;i++){
            if(map.containsKey(str[i])){
                map.put(str[i],map.get(str[i])+1);
            }else {
                map.put(str[i],1);
            }
        }
        int max=0;
        for(HashMap.Entry<Character,Integer> entry:map.entrySet()){
            if(entry.getValue()>max){
                max = entry.getValue();
            }
        }
        System.out.println(max);
    }
}
